package com.shanghaionstar.remote.share;

import android.os.Bundle;

import com.onstar.cn.framework.annotation.ContentView;
import com.onstar.cn.framework.mvp.base.core.BaseActivity;
import com.onstar.cn.framework.mvp.base.core.BasePresenter;
import com.shanghaionstar.R;
import com.shanghaionstar.swipe.SwipeActivity;

/**
 * Created by 11203rl on 2017/5/18.
 */
@ContentView(R.layout.fragment_container)
public class ShareRemoteActivity extends SwipeActivity{


    @Override
    public BasePresenter getPresenter() {
        return null;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        switchToRoleList();
    }

    public void switchToRoleList() {
        ShareRoleListFrg listFrg = new ShareRoleListFrg();
        changeFragment(getSupportFragmentManager(), listFrg, ShareRoleListFrg.class, true);
    }


    @Override
    public void onBackPressed() {
        if (getSupportFragmentManager().getBackStackEntryCount() == 1) {
            this.finish();
        } else {
            super.onBackPressed();
        }
    }

}
